from moviepy.editor import AudioFileClip
import os

video_list = os.listdir('./test/video')
for video in video_list:
    video_path = os.path.join('./test/video', video)
    audio_path = os.path.join('./test/noisy', video[:-4]+'.wav')
    curr_audio = AudioFileClip(video_path)
    curr_audio.write_audiofile(audio_path, logger=None)
    curr_audio.close()